#include <iostream>
#include "bpf_loader.h"
#include "logging.h"

int main(int argc, char* argv[])
{
    if (argc != 3) {
        std::cerr << "Usage: " << argv[0] << " <load|unload> <path_to_elf>" << std::endl;
        return 1;
    }

    const char* operation = argv[1];
    const char* elfPath = argv[2];

    if (strcmp(operation, "load") == 0) {
        OHOS::NetManagerStandard::LoadElf(elfPath);
    } else if (strcmp(operation, "unload") == 0) {
        OHOS::NetManagerStandard::UnloadElf(elfPath);
    } else {
        std::cerr << "Invalid operation: " << operation << ". Use 'load' or 'unload'." << std::endl;
        return 1;
    }

    return 0;
}
